// dlg.txt

begintalkscript;

variables;

begintalknode 1;
	state = -1;
	nextstate = -1;
	condition = get_sdf(15,2) == 0;
	question = "special";
	text1 = "Staring out over the fen, you are confronted with a grim testimonial to the devastation of the war. There was once a small town here. Swamp dwellers, who lived off of the herbs and materials they could gather from the fen.";
	text2 = "The town has been demolished. Most of the buildings have been destroyed. All of them bear huge burned patches, where they were struck with bolts of raw magical power. Some of them were then personally dismantled by something very large. With claws.";
	text3 = "All of the people are gone now. The destroyers have also departed. Though they might return.";
	action = SET_SDF 15 2 1;

begintalknode 2;
	state = -1;
	nextstate = -1;
	condition = get_sdf(15,3) == 0;
	question = "special";
	text1 = "The stone building in the southeast corner of the town was the largest structure. It was several linked domes, marked with the symbol of the Shapers.";
	text2 = "Though its owner has gone (or was killed), it is not unoccupied. You can see a huge, reptilian figure walking around inside it. It is barely visible in the shadows.";
	text3 = "While it might not immediately be hostile, if it catches you inside its lair, it will definitely be annoyed.";
	action = SET_SDF 15 3 1;

begintalknode 3;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "__";

begintalknode 4;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The drayk Pheleryss sees you nosing around in his lair. He is predictably furious. He doesn't bother with conversation. He just charges.";

begintalknode 5; // trapdoor
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "You open the trapdoor and climb down the ladder. You find a narrow stone corridor. It has completely collapsed. Tons of rock block the way through.";
	text2 = "There was probably something interesting in the smithy. Whatever it is, if it still exists, you will only be able to reach it from the other side.";

begintalknode 6; // machine 1
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "This is an old, abandoned piece of Shaper machinery. Between the moist air of the fen and the ravages of war, it is no longer functional. The crystals are cracked and the metal frame is rusting away.";

begintalknode 7; //  machine 1
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "This is an old, abandoned piece of Shaper machinery. Between the moist air of the fen and the ravages of war, it is no longer functional. The crystals are cracked and the metal frame is rusting away.";
	text2 = "You open up a panel at the base and see something glittering deep inside the housing. However, you don't know how to get it loose without cracking or damaging it. You have to leave it alone.";
	text3 = "You open up a panel at the base and see something glittering deep inside the housing. You reach in and smack the housing in a few strategic spots. A few crystals shake loose and roll out.";
	code =
		if (gf(15,4) > 0) {
			rs(2); rs(3);
			}
			else if (get_stat(21) > 4) {
				sf(15,4,1);
				rs(2);
				award_party_xp(50,5);
				reward_give(7);
				reward_give(119);
				reward_give(120);
				}
				else rs(3);
	break;
	
begintalknode 8; // papers
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "When Helft was attacked and destroyed, it looks like someone tried to search through this desk and get something of importance. They were interrupted. The papers within are disorganized, but intact.";
	text2 = "They look like interesting bits of Shaper research. You gather them up and put them in your pack. There are probably a number of people who would pay well for Shaper secrets.";
	text3 = "You search through the rest of the trash in the desk. You don't find anything useful.";
	code =
		if (gf(15,1) == 0) {
			rs(3);
			sf(15,1,1);
			set_spec_item(12,1);
			}
			else {
				rs(1); rs(2);
				}
	break;	
begintalknode 9;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The obelisk says:";
	text2 = "  WELCOME TO HELFT";
	



begintalknode 10;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Pheleryss";
	text1 = "The new owner of this ruin confronts you. It is a drayk, one of the most cunning and intelligent of creations. So tricky, in fact, that they are declared Barred. Loyal Shapers are supposed to kill drayks on sight.";
	text2 = "And yet, this old and powerful specimen is still here, living in a Shaper's abandoned home. And he doesn't want to give it up. He lets out a long, angry hiss.";
	text3 = "_Sssss! I am Pheleryss, intruder. I claim this land for me and my hoard. Do what you want with the vlish. I did not invite them. They are pestsss. But if you enter my home, I will destroy you._";
	text5 = "Pheleryss snarls at you. _Hsss. Still here? I do not trade with your kind. I will only be left alone._";
	action = INTRO;

begintalknode 11;
	state = 10;
	nextstate = 11;
	condition = 1;
	question = "How was this town destroyed?";
	text1 = "_I had nothing to do with it. This is the work of the Unbound. I came here only after the deed was done. I wish no contact with them._";

begintalknode 12;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "Where are the Unbound now?";
	text1 = "_Still out there. Still roaming the fen. They sleep, when they sleep, in the ruin to the west._";
	text2 = "The creature grins. _Maybe you should visit them. If you can sneak into their fort, who knows what treasuresss you will find._";
	text3 = "The drayk must not be aware that the Unbound are dead now.";
	code =
		if (gf(25,1) == 0)
			rs(3);
	break;
	
begintalknode 13;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "Why do you avoid the Unbound?";
	text1 = "_Because of how they are created. When they are unleashed and sent into Shaper landsss, they go mad. They attack all but their fellow Unbound. They would devour me._";
	text2 = "_They should have been slain by the Shapersss long before now. The humansss can't hunt them well in the swamp. Maybe you should go fight them. Maybe they have lotsss of wealth._";
	
begintalknode 14;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "Why do the Shapers allow you to stay here?";
	text1 = "_Sssss! Astoria, their queen, hidesss in her town. She has stopped hunting roguesss and escaping servilesss, and the drakons and rebelsss do not attack her._";
	text2 = "_I mock the weaknessss and confusion of your leadersss._";

begintalknode 15;
	state = 10;
	nextstate = 12;
	condition = gf(15,5) == 0;
	question = "Can I enter your home?";
	text1 = "The drayk rears back. Wisps of smoke rise from his nostrils. _No! I claim it. It isss mine. If I catch you inside, I will devour you! I will not negotiate. None of your kind will set foot inside._";

begintalknode 16;
	state = 10;
	nextstate = -1;
	condition = gf(15,5) > 0;
	question = "Can I enter your home?";
	text1 = "_Do not mock me. I will allow you entrance, but I can only be pushed so far._ He turns and stalks away.";
	action = END_TALK;

begintalknode 17;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "Can we talk about something else?";
	text1 = "_No! You have wasted enough of my time! Go and leave me be._";
	text2 = "He turns and stalks away.";
	action = END_TALK;

begintalknode 18;
	state = 12;
	nextstate = 14;
	condition = get_stat(20) > 4;
	question = "If you attack me, I will defeat you.";
	text1 = "They drayk looks you over. _You are probably right. You might slay me. But I will fight and die to defend my home and my hoard. It isss a matter of honor. I will not hesitate to risk my life._";

begintalknode 19;
	state = 14;
	nextstate = -1;
	condition = 1;
	question = "Can we talk about something else?";
	text1 = "_No! You have wasted enough of my time! Go and leave me be._";
	text2 = "He turns and stalks away.";
	action = END_TALK;
	
begintalknode 20;
	state = 14;
	nextstate = -1;
	condition = get_stat(20) > 6;
	question = "No, I will not slay you. I will take control of you.";
	text1 = "You have managed to identify what would really scare this drayk. It doesn't fear death. It fears Shaper control. You can see the terror in his eyes. He is furious, but your bluff pays off.";
	text2 = "_You would enter? Then go. See what you want. Then get out. And if I see you by my nest, touching my hoard, I will not back down._";
	text3 = "He turns and stalks away.";
	action = END_TALK;
	code =
		sf(15,5,1);
		award_party_xp(100,7);
	break;
	
begintalknode 21;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "I have had enough of your insolence. (Attack.)";
	text1 = "The drayk bares his huge fangs. _I have killed many challengers. You are only the next to feed me and my pets._";
	action = END_TALK;
	code =
		set_attitude(29,10);
	break;
	
begintalknode 22;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "That is all I have to say.";
	text1 = "_Then go. Leave my land. And count yourself lucky I have not fed you to my pets._";
	text2 = "He turns and stalks away.";
	action = END_TALK;

begintalknode 28;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "There is an instant change in the air. A magic charge. Your skin tingles. The air seems to grow darker.";
	text2 = "Your altered senses immediately pick it up. Something has entered the region somewhere to the northwest. Something enormously powerful. Something is out hunting.";
	action = SET_SDF 15 7 1;	
	
//

begintalknode 30;
	state = -1;
	nextstate = 30;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 31;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 32;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 33;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 34;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 35;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 36;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 37;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 38;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 39;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 40;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 41;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 42;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 43;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 44;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
//

begintalknode 50;
	state = -1;
	nextstate = 50;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 51;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

	
begintalknode 52;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 53;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 54;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 55;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 56;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 57;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 58;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 59;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 60;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 61;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 62;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 63;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 64;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

//

begintalknode 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 71;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

//

begintalknode 90;
	state = -1;
	nextstate = 90;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 91;
	state = 90;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
		